package com.xtgg.manager;

import com.umeng.message.PushAgent;
import com.xtgg.R;
import com.xtgg.login.*;
import com.xtgg.main.MainActivity;
import com.xtgg.util.PreferencesUtils;

import android.content.Intent;
import android.os.Bundle;

public class WelcomeActivity extends BaseActivity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_welcome);

		String userId = PreferencesUtils.getString(this, "userid");
		if (userId != null && userId.length() > 0) {
			startActivity(new Intent(this, MainActivity.class));
		} else {
			startActivity(new Intent(this, FirstActivity.class));
		}

		finish();
		
		PushAgent mPushAgent = PushAgent.getInstance(this);
		mPushAgent.enable();
	}
}
